n,k=map(int,input().split())
nums=list(map(int,input().split()))

count=0

result=0
for num in nums:
    result+=num
    if result>=k:
        count+=1
        result=0

if result!=0:
    count+=1

print(count)